import java.util.Arrays;
import java.util.Random;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2024-03-04
 * Time: 10:16
 */
public class TestSort1 {
    //随机产生一组数据
    public static void notOrderArray(int[] array){
        Random random = new Random();
        for (int i = 0; i < array.length; i++) {
            array[i]  = random.nextInt(100);
        }
    }

    public static void main(String[] args) {
        int[] array = new int[10];
        notOrderArray(array);
        System.out.println(Arrays.toString(array));
        Sort1.bubbleSort(array);
        System.out.println(Arrays.toString(array));

        System.out.println("==================================");
        notOrderArray(array);
        System.out.println(Arrays.toString(array));
        Sort1.insetSort(array);
        System.out.println(Arrays.toString(array));

        System.out.println("==================================");
        notOrderArray(array);
        System.out.println(Arrays.toString(array));
        Sort1.selectSort(array);
        System.out.println(Arrays.toString(array));

        System.out.println("==================================");
        notOrderArray(array);
        System.out.println(Arrays.toString(array));
        Sort1.selectSort(array);
        System.out.println(Arrays.toString(array));
    }
}
